<template>
	<div class="child">
		<h1>我是Child组件</h1>
		<h2>我父亲给我的车：{{myChe}}</h2>
		<button @click="changeCar">换车</button>
	</div>
</template>

<script>
	export default {
		name:'Child',
		data() {
			return {
				myChe:this.che
			}
		},
		props:['che'],
		methods:{
			changeCar(){
				this.myChe = '奔驰C63'
			}
		}
	}
</script>

<style scoped>
	.child{
		background-color: orange;
		padding: 20px;
	}
</style>